import request from '@/utils/request'

// 查询订单投诉列表
export function listComplaint(query) {
  return request({
    url: '/biz/complaint/list',
    method: 'get',
    params: query
  })
}

// 查询订单投诉详细
export function getComplaint(id) {
  return request({
    url: '/biz/complaint/' + id,
    method: 'get'
  })
}

// 新增订单投诉
export function addComplaint(data) {
  return request({
    url: '/biz/complaint',
    method: 'post',
    data: data
  })
}

// 修改订单投诉
export function updateComplaint(data) {
  return request({
    url: '/biz/complaint',
    method: 'put',
    data: data
  })
}

// 删除订单投诉
export function delComplaint(id) {
  return request({
    url: '/biz/complaint/' + id,
    method: 'delete'
  })
}

// 启用禁用订单投诉
export function changeStatus(data) {
  return request({
    url: '/biz/complaint/changeStatus',
    method: 'put',
    data: data
  })
}
// 处理
export function dealWith(data) {
  return request({
    url: '/biz/complaint/dealWith',
    method: 'post',
    data: data
  })
}
